package com.wangy.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class ConfigProperties extends Properties{
	
	Logger logger = Logger.getLogger(this.getClass());
	public ConfigProperties(String properties){
		this(ConfigProperties.class.getClassLoader().getResourceAsStream(properties));
		logger.info("load resource file:"+properties);

	}

	public ConfigProperties(InputStream in){
		try {
			this.load(in);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public String getValue(String key){
		return getProperty(key);
	}
}
